<div id="showPost">
    <div class="date"><?=$post['date']?></div>    
    <h2><?=$this->escape($post['title'])?></h2>
    <div class="text"><?=$post['text']?></div>
</div>

<!-- Comments -->
<div id="comments">
<?php
if (!empty($comments) && is_array($comments)) {
?>
    <h4>коментарии(<?=$commentsCount;?>)</h4>
<?php
    foreach ($comments as $comment) {
?>
    <div class="commentEntry">
        <div class="meta"><span class="author"><?=$this->escape($comment['author']);?></span> <span class="time"><?=$comment['date']?></span></div>
        <div class="message"><?=$this->escape($comment['text']);?></div>
    </div>
<?php
    }
} else {
?>
    <h6>Коментариев к статье пока нет</h6>
<?php    
}
?>
</div>
<div id="commentsForm">
<?php 
    if (!empty($form)) {
        echo $form->startRender();
?>
        <fieldset>
            <legend>Ваш комментарий:</legend>
            <label for="author">Имя:</label><?=$form->author;?>
            <?=$form->text;?>
            
                <label for="captchakey">Введите цифры с картинки:</label>
                <p><?=$form->captchakey;?></p>
                <p><?=$form->captcha;?></p>  
            
            <?=$form->submit;?>
        </fieldset>
<?php
        echo $form->endRender();
    }
?>
</div>
